package com.cn.xiaonuo.slbfinances.slbagents.service.impl;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.cn.xiaonuo.common.constant.AgentConstant;
import com.cn.xiaonuo.common.constant.SystemConstant;
import com.cn.xiaonuo.common.entity.BusinessMessage;
import com.cn.xiaonuo.common.utils.AgentUtils;
import com.cn.xiaonuo.common.utils.StringUtils;
import com.cn.xiaonuo.dbs.core.annotation.DataSource;
import com.cn.xiaonuo.slbfinances.members.entity.SlUser;
import com.cn.xiaonuo.slbfinances.members.mapper.SlUserMapper;
import com.cn.xiaonuo.slbfinances.slbagents.entity.SlXsHpcBuy;
import com.cn.xiaonuo.slbfinances.slbagents.entity.SlXsProxyData;
import com.cn.xiaonuo.slbfinances.slbagents.mapper.SalesOperationsMapper;
import com.cn.xiaonuo.slbfinances.slbagents.mapper.SlXsHpcBuyMapper;
import com.cn.xiaonuo.slbfinances.slbagents.mapper.SlXsProxyDataMapper;
import com.cn.xiaonuo.slbfinances.slbagents.mapper.SlbOperationsMapper;
import com.cn.xiaonuo.slbfinances.slbagents.service.ISalesOperationsService;
import com.cn.xiaonuo.slbfinances.slbagents.service.SlbOperationsService;
import com.github.pagehelper.PageHelper;
import com.github.pagehelper.PageInfo;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.sql.Connection;
import java.sql.DriverManager;
import java.sql.ResultSet;
import java.sql.Statement;
import java.util.Date;
import java.util.HashMap;
import java.util.List;
import java.util.Map;

@Service
public class SlbOperationsServiceImpl extends ServiceImpl<SlbOperationsMapper, String> implements SlbOperationsService {

    @Resource
    private SlbOperationsMapper slbOperationsMapper;

    //查看代理条件进度
    @Override
    @DataSource(name = "jyb_soole_data_hn")
    public Map<String,String> getSlbProxyData(String userId) {
        return slbOperationsMapper.getSlbProxyData(userId);
    }

    /**
     * 获取代理数据
     * @param userId
     * @param beginTime
     * @param endTime
     * @return
     */
    @Override
    @DataSource(name = "jyb_soole_data_hn")
    public   List<Map<String,String>>getSlbProxyBuyAmount(String userId,String beginTime, String endTime){
        return slbOperationsMapper.getSlbProxyBuyAmount(userId, beginTime, endTime);
    }
}
